package com.clock.mapper;


import com.clock.domain.dto.FollowStateDTO;
import com.clock.domain.dto.UserInfoDTO;
import com.clock.domain.entity.Follow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * @author: makejava
 * @date: 2023-02-06 12:46:25
 * @description: (com.clock.domain.entity.Follow)表数据库访问层
 */
@Mapper
public interface FollowMapper {

    void updateFollowState(FollowStateDTO followStateDto);

    Follow selectFollow(@Param("followId") Long followId);

    Follow selectFollowByByUserIdAndFollowUserId(@Param("userId") Long userId, @Param("followUserId") Long followUserId);

    int insertFollow(@Param("followStateDto") FollowStateDTO followStateDto);

    Follow selectFollowByUserIdAndCreateTime(@Param("userId") Long userId, @Param("createTime") Date createTime);

    Follow selectFollowByUserIdAndUpdateTime(@Param("userId") Long userId, @Param("updateTime") Date updateTime);

    Set<Long> selectFollowsByUserId(@Param("userId") Long userId);

    List<UserInfoDTO> queryFollowsInfoByIds(@Param("ids") Set<Long> ids);

    List<UserInfoDTO> queryFansInfos(@Param("userId") Long userId);

}
    

